import App from './App'
import { createSSRApp } from 'vue'
import pinia from './store'
import uvUI from '@/uni_modules/uv-ui-tools'
import fuiLoading from '@/components/fui-loading/fui-loading.vue';  // 引入全局组件


export function createApp() {
  const app = createSSRApp(App);
  app.use(uvUI);
  app.component('fuiLoading', fuiLoading);  // 注册全局组件
  app.use(pinia)
  return {
    app
  }
}

// 全局接口挂载
import * as api from '@/apis/index.js'
import pingpp from 'pingpp-js'
uni.api = api;
uni.pingpp = pingpp;
